package com.gm.manager.module.login.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author zhuZhaoYang
 * @date 2021/8/7 15:02
 */
@Data
public class UpdatePassword {
    @NotBlank(message = "请先登录")
    private String token;
    @NotBlank(message = "旧密码不能为空")
    private String oldPassword;
    @NotBlank(message = "新密码不能为空")
    @Pattern(message = "密码包含 数字,英文,字符中的两种以上，长度6-20",
    regexp = "^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$")
    private String newPassword;
}
